/**
 * There are <a href="https://github.com/thinkgem/jeesite">JeeSite</a> code generation
 */
package com.chlitina.store.modules.expert.entity;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

import com.chlitina.store.common.persistence.BaseEntity;

/**
 * 专家推荐方案Entity
 * @author liujiang
 * @version 2013-07-22
 */
@Entity
@Table(name = "expert_experience_problem_solution_detail")
@IdClass(SolutionFaceParameterPK.class)
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class ExpertExperienceProblemSolutionDetail extends BaseEntity {
	
	private static final long serialVersionUID = 1L;
	private ExpertExperienceProblemSolution expertExperienceProblemSolution; 		// 专家推荐方案
	private Parameter parameter; 		// 参数

	public ExpertExperienceProblemSolutionDetail() {
	}

	@Id
	@ManyToOne(cascade={CascadeType.REFRESH},fetch = FetchType.LAZY)
	@JoinColumn(name="EEPS_ID")
	@NotFound(action = NotFoundAction.IGNORE)
	@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
	@NotNull
	public ExpertExperienceProblemSolution getExpertExperienceProblemSolution() {
		return expertExperienceProblemSolution;
	}

	public void setExpertExperienceProblemSolution(ExpertExperienceProblemSolution expertExperienceProblemSolution) {
		this.expertExperienceProblemSolution = expertExperienceProblemSolution;
	}

	@Id
	@ManyToOne(cascade={CascadeType.REFRESH},fetch = FetchType.LAZY)
	@JoinColumn(name="PARAMETER_ID")
	@NotFound(action = NotFoundAction.IGNORE)
	@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
	@NotNull
	public Parameter getParameter() {
		return parameter;
	}

	public void setParameter(Parameter parameter) {
		this.parameter = parameter;
	}
}


